Skip to content

Conversation

@nrc
Copy link
Member

@nrc nrc commented Jun 30, 2015

Reports the resident set size after each pass (linux-only).

r? @huonw or @alexcrichton

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is just using normal apis, could this do if cfg! instead of #[cfg]? (helps porting and dealing with unused imports).

Reports the resident set size after each pass (linux-only).
@nrc
Copy link
Member Author

nrc commented Jul 1, 2015

Updated; r? @alexcrichton

@rust-highfive rust-highfive assigned alexcrichton and unassigned huonw Jul 1, 2015
@retep998
Copy link
Contributor

retep998 commented Jul 2, 2015

Why not Windows as well?

let mut pmc: PROCESS_MEMORY_COUNTERS = mem::zeroed();
pmc.cb = mem::size_of_val(pmc);
assert!(GetProcessMemoryInfo(GetCurrentProcess(), &mut pmc, pmc.cb) != 0);
return pmc.WorkingSetSize;

@nrc
Copy link
Member Author

nrc commented Jul 2, 2015

@retep998 a PR would be very welcome! (I can't test it myself, so not keen to try).

@alexcrichton
Copy link
Member

@bors: r+ 7713e14

I agree that it's not super critical that we have a windows implementation right out of the gate, but feel free to PR it!

@bors
Copy link
Collaborator

bors commented Jul 2, 2015

⌛ Testing commit 7713e14 with merge dd8fee0...

bors added a commit that referenced this pull request Jul 2, 2015
Reports the resident set size after each pass (linux-only).

r? @huonw or @alexcrichton
@bors bors merged commit 7713e14 into rust-lang:master Jul 2, 2015
bors added a commit that referenced this pull request Jul 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants